Skip to content

ELSE expressions terminate early when encountering an END token#654

Open
SharpDerek wants to merge 1 commit intophpmyadmin:masterfrom
SharpDerek:fix/588-case-with-alias-is-not-properly-parsed
Open

ELSE expressions terminate early when encountering an END token#654
SharpDerek wants to merge 1 commit intophpmyadmin:masterfrom
SharpDerek:fix/588-case-with-alias-is-not-properly-parsed

Conversation

@SharpDerek
Copy link
Copy Markdown

CASE statements with an ELSE returning a value with the "tablename.columnname" format fail due to encountering an END token and parsing it as if it were a column instead. This fixes the issue by checking to see if the current token is an END and breaks before column processing.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.30%. Comparing base (f440917) to head (70b388b).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #654   +/-   ##
=========================================
  Coverage     96.30%   96.30%           
- Complexity     2254     2255    +1     
=========================================
  Files            90       90           
  Lines          4982     4982           
=========================================
  Hits           4798     4798           
  Misses          184      184           
Flag Coverage Δ
unit-8.2-ubuntu-latest 96.30% <100.00%> (ø)
unit-8.3-ubuntu-latest 96.30% <100.00%> (ø)
unit-8.4-ubuntu-latest 96.30% <100.00%> (ø)
unit-8.5-ubuntu-latest 96.30% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this fix. If possible please reset your branch to 5.11.x and cherry pick your work and force push.
It will allow us to have the fix on 5.11.x
Else just let me know and I will do it manually

@williamdes
Copy link
Copy Markdown
Member

Also, please add test cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants